<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>Title1</h1>
    <!--补齐上下文信息 /springmvc/target -->
    <a th:href="@{/target}">target.html</a>
    <br>

    <!--get请求 -->
    <a th:href="@{/get}">get请求</a>
    <br>

    <!--post 请求 -->
    <form th:action="@{/post}" method="post">
        <input type="submit" value="post 请求">
    </form>
    <br>

    <!--使用get 请求访问post方法 -->
    <a th:href="@{/post}">使用get请求访问post方法</a>
    <br>

    <!--put请求 -->
    <form th:action="@{/put}" method="post">
        <input type="hidden" name="_method" value="put">
        <input type="submit" value="put 请求">
    </form>
    <br>

    <!--delete请求 -->
    <form th:action="@{/delete}" method="post">
        <input type="hidden" name="_method" value="delete">
        <input type="submit" value="delete 请求">
    </form>
    <br>

    <!--testAnt请求 -->
    <a th:href="@{/aaa/testAnt}">testAnt请求</a>
    <br>

    <!--restful风格的请求 -->
    <a th:href="@{/restful/2}">restful 风格的请求</a>
    <br>

    <!--域对象 -->
    <a th:href="@{/scope/testServlet}">servlet 域对象</a><br>
    <a th:href="@{/scope/testModelAndView}">modelAndView 域对象</a><br>
    <a th:href="@{/scope/testModel}">model 域对象</a><br>
    <a th:href="@{/scope/testMap}">map 域对象</a><br>
    <a th:href="@{/scope/testModelMap}">modelMap 域对象</a><br>
    <a th:href="@{/scope/testSession}">session 域对象</a><br>
    <a th:href="@{/scope/testApplication}">application 域对象</a><br>

    <!--视图解析器 -->
    <a th:href="@{/view/testForward}">forward 视图</a><br>
    <a th:href="@{/view/testRedirect}">redirect 视图</a><br>
    <a th:href="@{/view/thymeleafView}">thymeleaf 视图</a><br>

    <!--RESTFul demo -->
    <a th:href="@{/user/user/1}">RESTFul Get</a><br>

    <form th:action="@{/user/user}" method="post" enctype="application/json">
        <input name="id" type="text"/>
        <input type="submit" value="RESTFul Post"/>
    </form><br>

    <form th:action="@{/user/user/2}" method="post">
        <input name="_method" type="hidden" value="delete"/>
        <input type="submit" value="RESTFul Delete"/>
    </form><br>

    <form th:action="@{/user/user/3}" method="post">
        <input name="_method" type="hidden" value="put"/>
        <input type="submit" value="RESTFul Put"/>
    </form><br>

    <a th:href="@{/user/getResponseBody}">response body</a><br>

    <a th:href="@{/user/fileDownload}">node1 下载</a><br>

    <!-- 文件上传 -->
    <form th:action ="@{user/upload}" method="post" enctype="multipart/form-data">
        <input type="file" name="photo">
        <input type="submit" value="上传">
    </form>
<br>

    <!--异常处理 -->
    <a th:href="@{/user/error}">测试异常处理</a><br>
</body>
</html>